//导入工具类
import request from "@/utils/request";

//查询所有行业类型
export const getAllIndustrytype = (pageNum,pageSize,keyword) =>{
    return request.get(`/industrytype/page?pageNum=${pageNum}&pageSize=${pageSize}&keyWord=${keyword}`);
}

//查询总页数
export const getAllPage = (keyword) =>{
    return request.get(`/industrytype/count?keyWord=${keyword}`);
}
//删除行业类型
export const deleIndustry = (id) =>{
    let financing = {
        id:id,
    }
    return request.get("/industrytype/del",financing);
}
//修改行业类型
export const changeIndustry = (indus) =>{
    let industry 
    if(indus.industryTypeId == 0){
        industry = {
            industryTypeName:indus.industryTypeName,
            tip:0
        }
    }else{
        industry = {
            industryTypeId:indus.industryTypeId,
            industryTypeName:indus.industryTypeName
        }
    }
    
    return request.post("/industrytype",industry);
}
